package morningClass;

public class People {
    private String name;
    private int age;

    //2.提供私有方法
    private void save(int m,String n) {
        System.out.println(name+"在"+m+"年前救了"+n);
    }
    private void update() {
        System.out.println("update()..");
    }

    @Override
    public String toString() {
        return "People{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    private People(String name, int age) {
        this.name = name;
        this.age = age;
    }

}